package com.margo.project.web.security.configuration;

import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;


@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter{
//		@Autowired
//	public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
//		auth.inMemoryAuthentication()
//				.withUser(User.withUsername("user").password("user").roles("USER").build());
//	}
	@Override
    public void configure(WebSecurity web) throws Exception {
        //没用
//        web.ignoring().antMatchers("/v2/api-docs",//swagger api json
//                "/swagger-resources/configuration/ui",//用来获取支持的动作
//                "/swagger-resources",//用来获取api-docs的URI
//                "/swagger-resources/configuration/security",//安全选项
//                "/swagger-ui.html");
        
        web.ignoring().antMatchers("/validator/**");
        web.ignoring().antMatchers("/mvcconfig/**"); 
        web.ignoring().antMatchers("/argumentResolver/**");
        web.ignoring().antMatchers("/initbinder/**");
        web.ignoring().antMatchers("/redis/**");
        web.ignoring().antMatchers("/rest/**");
        web.ignoring().antMatchers("/cors/**");
        web.ignoring().antMatchers("/workbench/**");
        web.ignoring().antMatchers("/introduction/**");
    }
	 
}
